home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / Expander / Expander Classes / CExpander.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  2.1 KB  |  74 lines  |  [TEXT/KAHL]

  1. /***********************************************************************************
  2.     CExpander.h
  3.  
  4.     Copyright © 1994 B-Ray Software. All rights reserved.
  5.     Developed using Symantec C++ 7.0.2 and Symantec's TCL library.
  6.     Portions of this code courtesy Symantec, Inc.
  7.  
  8.     This code may be freely distributed as long as this notice remains. This code
  9.     may not be used in any commercial software without the consent of B-Ray Software.
  10.  
  11.     ---
  12.  
  13.     Header for CExpander class.
  14.  
  15. ***********************************************************************************/
  16. #pragma once
  17.  
  18.  
  19. #include <CStream.h>
  20.  
  21. #include "CExpanderPane.h"
  22. #include "CExpanderLabel.h"
  23. #include "CExpanderButton.h"
  24.  
  25.  
  26. class CExpander : public CExpanderPane {
  27.  
  28. TCL_DECLARE_CLASS
  29.  
  30. private:
  31.     Boolean            isExpanded;
  32.     Boolean            savedExpanderFlag;
  33.  
  34. protected:
  35.     static short const        kExpanderButtonSize;
  36.     CExpanderLabel    *itsLabel;
  37.     CExpanderButton    *itsButton;
  38.  
  39.     virtual void    MakeExpanderButton( void );
  40.     virtual void    MakeExpanderLabel( void );
  41.  
  42.     virtual void    ChangeSelf( long changedIndex, Rect *delta );
  43.     virtual void    ValidateHeader( void );
  44.     virtual void    SetMinimizedSize( void );
  45.     virtual void    SetExpandedSize( void );
  46.  
  47.     virtual void    ParentMessage( long message, void *param );
  48.  
  49. public:
  50.     CExpander();
  51.     CExpander( CView *anEnclosure, CBureaucrat *aSupervisor, 
  52.                short aWidth = 0, short aHeight = 0, short aHLoc = 0, short aVLoc = 0,
  53.                SizingOption aHSizing = sizFIXEDSTICKY, SizingOption aVSizing = sizFIXEDSTICKY );
  54.     virtual ~CExpander();
  55.  
  56.     virtual void    IExpander( void );
  57.  
  58.     virtual void    SetExpandedState( Boolean fExpanded );
  59.     virtual Boolean    IsExpanded( void ) { return isExpanded; };
  60.  
  61.     virtual void    SetLabelTextRsrcID( short rsrcID )        { itsLabel->SetLabelTextRsrcID( rsrcID ); };
  62.  
  63.     virtual void    SetLabelSelectable( Boolean aFlag )    { itsLabel->SetCanSelect( aFlag ); };
  64.  
  65.     virtual void    SetDblClickCmd( long theCommand ) { itsLabel->SetDblClickCmd( theCommand ); };
  66.  
  67.     virtual void    DoCommand( long theCommand );
  68.  
  69.     virtual void    DoKeyDown( char theChar, Byte keyCode, EventRecord *macEvent );
  70.  
  71.     virtual void    PutTo( CStream &stream );
  72.     virtual void    GetFrom( CStream &stream );
  73. };
  74.